// https://codyhouse.co/ds/globals/colors
// https://github.com/dracula/dracula-theme/

@mixin dark-theme {
    --theme-name: "dark";
    @include defineColorHSL(--color-primary, $primaryColorDarkH, $primaryColorDarkS, $primaryColorDarkL);
    @include defineColorHSL(--color-bg, 231, 14%, 10%);
    @include defineColorHSL(--color-contrast-lower, 230, 12%, 18%);
    @include defineColorHSL(--color-contrast-low, 240, 2%, 37%);
    @include defineColorHSL(--color-contrast-medium, 80, 2%, 69%);
    @include defineColorHSL(--color-contrast-high, 69, 9%, 84%);
    @include defineColorHSL(--color-contrast-higher, 60, 6%, 90%);
    .theme-icon-light {
        display: none;
    }
    .theme-icon-dark {
        display: inline-block;
    }
    img {
        filter: brightness(75%);
    }

    @if ($enableHighlight) {
        /* https://xyproto.github.io/splash/docs/all.html */
        /* Color values matching dracula style */

        --chroma-line-numbers-background: #ffffcc;
        --chroma-line-numbers-color: #7f7f7f;
        --chroma-keyword-color: #ff79c6;
        --chroma-name-color: #8be9fd;
        --chroma-attribute-color: #50fa7b;
        --chroma-literal-color: #f1fa8c;
        --chroma-number-color: #bd93f9;
        --chroma-comment-color: #6272a4;
        --chroma-deleted-color: #8b080b;
        --chroma-output-color: #44475a;
    }
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        @include dark-theme;
    }
}

@if ($defaultTheme == "dark") {
    :root {
        @include dark-theme;
    }
} @else {
    :root[data-theme="dark"] {
        @include dark-theme;
    }
}
